package org.mozhu.zufang.showcase.crud.service;

import org.mozhu.mboot.core.data.BaseService;
import org.mozhu.zufang.showcase.crud.entity.Sample;
import org.mozhu.zufang.showcase.crud.repository.SampleRepository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 示例 - 业务层实现类
 * 
 * @author ZhangPei
 */
@Transactional
@Service(value = "sampleService")
public class SampleServiceImpl extends BaseService<Sample, Long> implements SampleService {

	protected SampleRepository getBaseRepository() {
		return (SampleRepository) baseRepository;
	}

	@Override
	public Sample findByEmail(String email) {
		return getBaseRepository().findByEmail(email);
	}

}
